<script setup>
import { } from 'vue'
const props = defineProps(['video', 'index'])


</script>

<template>
  <div class="music-video-card">
    <div class="play-count-box">
      <i class="iconfont icon-bofang"></i>
      <span v-format-play-count="props.video.playCount"></span>
    </div>
    <div class="img-wrap">
      <img v-lazy-image="props.video.cover" alt="mv">
    </div>
    <div class="mv-info">
      <span>{{ props.index + 1 }}</span>
      <div class="info">
        <h3 class="ellipsis">{{ props.video.name }}</h3>
        <p>{{ props.video.artistName }}</p>
      </div>
    </div>
  </div>
</template>

<style scoped lang='scss'>
.music-video-card {

  &:hover {
    img {
      box-shadow: 0px 8px 12px #b3b3b3;
      transition: all .3s;
    }
  }

  .play-count-box {
    position: absolute;
    right: 20px;
    top: 15px;
    color: #fff;
    text-shadow: 0px 0px 6px rgb(64, 64, 64);

    span {
      margin-left: 5px;
    }
  }

  .img-wrap {
    height: 0;
    padding-bottom: 56%;
    background-color: #ececec;
    border-radius: 10px;

    img {
      width: 100%;
      max-height: 193px;
      object-fit: cover;
      border-radius: 10px;
    }
  }

  .mv-info {
    display: flex;
    margin-top: 10px;

    span {
      font-size: 24px;
      height: 40px;
      border-bottom: 3px solid $primaryColor;
      color: $primaryColor;
      font-weight: bold;
    }

    .info {
      margin-left: 20px;

      h3 {
        max-width: 330px;
        font-size: 20px;
        line-height: 35px;
        overflow: hidden;
      }

      p {
        color: #9b9b9b;
      }
    }
  }
}
</style>
